package thread;

import java.util.ArrayList;
import java.util.List;

public class StaticTest implements Runnable {

	StaticTest(int i) {
		this.i = i;
	}
	
	private int i;
	
	public static void main(String[] args) {
		StaticTest st1 = new StaticTest(10000);
		StaticTest st2 = new StaticTest(10000);
		Thread t1 = new Thread(st1,"线程一");
		Thread t2 = new Thread(st2,"线程贰");
		t1.start();
		t2.start();
		List list = new ArrayList();
	}
	
	public void run() {
		int n = Static.function(i);
//		System.out.println(Thread.currentThread().getName() + n);
	}
	
	
}
class Static {
	public static int function(int i) {
		for(int n=0; n<i; n++) {
			System.out.println(Thread.currentThread().getName() + n);
		}
		return i;
	}
}